home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-28 | 1.4 KB | 66 lines | [TEXT/CWIE] |
- // StringView.h
-
- #ifndef StringView_h
- #define StringView_h
-
- #ifndef View_h
- #include "View.h"
- #endif
- #ifndef HasForegroundColor_h
- #include "HasForegroundColor.h"
- #endif
- #ifndef HasBackgroundColor_h
- #include "HasBackgroundColor.h"
- #endif
- #ifndef HasFace_h
- #include "HasFace.h"
- #endif
- #ifndef HasVerticalJustification_h
- #include "HasVerticalJustification.h"
- #endif
- #ifndef HasHorizontalJustification_h
- #include "HasHorizontalJustification.h"
- #endif
- #ifndef Str_h
- #include "Str.h"
- #endif
-
- class StringView: public View,
- public HasForegroundColor,
- public HasBackgroundColor,
- public HasFace,
- public HasVerticalJustification,
- public HasHorizontalJustification
- {
- private:
- String255 string;
-
- protected:
- virtual void ForegroundColorChanged();
- virtual void BackgroundColorChanged();
- virtual void FaceChanged();
- virtual void VerticalJustificationChanged();
- virtual void HorizontalJustificationChanged();
-
- public:
- StringView( ::Face );
-
- virtual void Draw( const ViewMap& ) const;
-
- ConstPString String() const { return string; }
- void SetString( ConstPString );
-
- void Clear() { SetString( ConstPString( "\p" ) ); }
-
- virtual uint16 MinimumHeight() const;
-
- virtual uint16 ReasonableWidth() const;
-
- virtual uint16 BestWidth() const;
- virtual uint16 BestHeight() const;
-
- uint16 WidthOf( ConstPString ) const;
- };
-
- #endif
-